package com.lyf.design.learn.designmodel.visitor;

/**
 * @AUTHOR LYF
 * @DATE 2022/6/11
 * @VERSION 1.0
 * @DESC
 */
public class ElementB extends Element{
    @Override
    void accept(Visitor visitor) {
        System.out.println(visitor.getName()+"访问-B元素的操作");
        operation();
    }

    @Override
    void operation() {
        System.out.println("B Opt");
    }
}
